package com.itrencai.d12_Recurtion;

//使用递归计算1-n的阶乘 f（n-1）*n
public class JieCheng {
    public static void main(String[] args) {
        System.out.println(f(5));
    }
    public  static int  f(int  n){
        if(n==1){
            return n;
        }else{
            return f(n-1)*n;
        }
    }
}
